#include<iostream>

using namespace std;
int a[10],n;

int main()
{
  int i,aux;
  cout<<"n=";cin>>n;
  for(i=1;i<=n;i++)
 { cout<<"a["<<i<<"]=";
   cin>>a[i];
 }

aux=a[n-1];
for(i=n-1;i>=1;i--)
  {a[i]=a[i-1];
   a[0]=aux;
   }

for(i=1;i<=n;i++)
cout<<a[i];
}

